const heros = require('./test.json');

let result = heros.map(item => {
  return {
    name: item.name,
    image: item.image
  }
});

require('fs').writeFileSync('./test.json', JSON.stringify(result, null, 2));